package edu.gettysburg.catapp1;

import java.io.Serializable;
import java.util.ArrayList;

import com.google.android.maps.GeoPoint;

public class Tour implements Serializable {	

	/**
	 * 
	 */
	private static final long serialVersionUID = 394721108059985968L;
	private String description;
	private ArrayList<String> sites;
	private ArrayList<Integer> sitePoints;
	private ArrayList<Integer> allPoints;

	public Tour(String d, ArrayList<String> s, ArrayList<Integer> s2, ArrayList<Integer> a) {
		this.description = d;
		this.sites = s;
		this.sitePoints = s2;
		this.allPoints = a;
	}
	
	public ArrayList<GeoPoint> getSiteGeoPoints() {
		ArrayList<GeoPoint> sitePoints = new ArrayList<GeoPoint>();
		for (int i = 0; i < this.sitePoints.size();) {
			GeoPoint gp = new GeoPoint(this.sitePoints.get(i), this.sitePoints.get(i+1));
			sitePoints.add(gp);
			i += 2;
		}
		return sitePoints;		
	}
	
	public ArrayList<GeoPoint> getAllGeoPoints() {
		ArrayList<GeoPoint> allPoints = new ArrayList<GeoPoint>();
		for (int i = 0; i < this.allPoints.size();) {
			GeoPoint gp = new GeoPoint(this.allPoints.get(i), this.allPoints.get(i+1));
			allPoints.add(gp);
			i += 2;
		}
		return allPoints;		
	}

	public String getDescription() {
		return description;
	}

	public ArrayList<String> getSites() {
		return sites;
	}

	public ArrayList<Integer> getSitePoints() {
		return sitePoints;
	}

	public ArrayList<Integer> getAllPoints() {
		return allPoints;
	}

}
